package com.acoffee.service.Impl;

import com.acoffee.mapper.RbacPermMapper;
import com.acoffee.pojo.RbacPerm;
import com.acoffee.service.RbacPermService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author acoffee
 * @create 2021-11-27 14:13
 */
@Service
public class RbacPermServiceImpl implements RbacPermService {
    @Autowired
    RbacPermMapper rbacPermMapper;

    @Override
    public List<RbacPerm> queryAll() {
        List<RbacPerm> rbacPerms = rbacPermMapper.queryAll();
        return rbacPerms;
    }

    @Override
    public RbacPerm queryOne(int id) {
        RbacPerm rbacPerm = rbacPermMapper.queryOne(id);
        return rbacPerm;
    }

    @Override
    public boolean updateOne(RbacPerm perm) {
        boolean flag = rbacPermMapper.updateOne(perm);
        return flag;
    }

    @Override
    public boolean addOne(RbacPerm perm) {
        boolean flag = rbacPermMapper.addOne(perm);
        return flag;
    }

    @Override
    public boolean deleteOne(int id) {
        boolean flag = rbacPermMapper.deleteOne(id);
        return flag;
    }
}
